Skip to content

Feature/api testing layer - #6

Merged
IgStep merged 8 commits into
mainfrom
feature/api-testing-layer
Nov 24, 2026
Merged

IgStep merged 8 commits into
mainfrom
feature/api-testing-layer

Conversation

@IgStep

@IgStep IgStep commented Nov 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

IgStep and others added 8 commits November 24, 2026 05:13
`xdist` is an unrelated pairwise-distance library (not pytest-xdist) that
pulled in pandas and numpy and broke installs on Python 3.14. Add pydantic
for response contract models.

requirements.txt is regenerated as UTF-8 with direct dependencies only
(it was a UTF-16 pip freeze dump). greenlet is bumped in the lock file
because 3.2.2 has no Python 3.14 wheel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wrap long lines, sort imports, and remove an icon-font glyph (U+E023)
that had been copied into the "Signup / Login" role name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tures

The custom browser/context fixtures hardcoded headless mode and bypassed
the plugin's context fixture, so --screenshot, --tracing and --video had
no effect. `ui` is now built on the plugin's `page`; browser selection
uses the built-in --browser / --browser-channel / --headed options.

Add package __init__ files so same-named test modules in different
folders cannot collide, and ignore the real test-results/ output path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin seeds every test with 0, which would give all tests identical
data. Seed randomly per test, log it, and allow replay via FAKER_SEED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- BaseApiClient wraps APIRequestContext and returns an ApiResponse
  snapshot (status, body, timing) that is printed in assertion messages
- ProductsClient / AccountsClient expose one method per endpoint
- strict Pydantic response models (extra="forbid") act as contracts
- assert_api_response checks HTTP status and body responseCode
  separately: the API returns HTTP 200 for most errors
- build_user factory with UUID-based emails for parallel-safe data

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
92 tests: catalog and search behaviour, account lifecycle, login,
required/optional fields, every unsupported method per endpoint, and
strict contract checks. Accounts are created and cleaned up via
fixtures; tests run in parallel with -n auto.

Replaces tests/test_api.py, whose base URL ("/api" + "/productsList")
resolved to the site root, so the product list test passed against the
homepage without ever calling the API.

Add api/ui/contract/negative/regression markers; api and ui are applied
automatically by folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- log in through the UI with a user created via API
- sign-up test verifies the new account via API and deletes it
  afterwards (it previously left an account behind on every run)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IgStep
IgStep merged commit 2604c65 into main Nov 24, 2026
1 of 2 checks passed
@IgStep
IgStep deleted the feature/api-testing-layer branch November 24, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant